package com.wyt.cloud.utils.query.anno;

import com.wyt.cloud.utils.query.FilterMatchRuleEnum;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FilterParam {

    /**
     * if your defined field is not the same as the field of pojo entity,
     * you can use matchField() to customize the field
     *
     * @return
     */
    String matchField() default "";
    /**
     * judge current field whether need to match or not;
     * @return
     */
    boolean needMatch() default true;
    /**
     *
     * @return
     */
    FilterMatchRuleEnum matchRule() default FilterMatchRuleEnum.EQ;
}
